import * as API from '../utils/api'

export const LOAD_INVEST_SHOW_LIST = 'LOAD_INVEST_SHOW_LIST'
export const UPDATE_INVEST_SHOW_LIST = 'UPDATE_INVEST_SHOW_LIST'

export const loadInvestShowList = function ({showType=1,...rest}) {
    return async function (dispatch)  {
        const list = await API.fetchShowMain({showType,...rest})
        dispatch(updateInvestShowList({
            ...list
        }))
    }
}
export const updateInvestShowList = list => ({type: UPDATE_INVEST_SHOW_LIST, list})